<?php
define("DEPLOYED",false);
require "global.php";

$head ="<table border='0' cellspacing='10px'>";
$head .= "<tr bgcolor='#eeeeee'><td>品牌</td><td>商品</td><td>专柜价</td><td>双11狂欢价</td><td>备用网址</td></tr>";
$line = "";

$mailList = array("745158412@qq.com");

$pro_db = new PormotionDB();

	$list = $pro_db->getSortPromotionAllList();
	foreach($list as $row){
		$aline = "<tr><td>".$row['brand_name'].'</td><td><a href="'.$row['baidu_url'].'" target="_blank">'.$row['goods_title'].'</a></td><td>'.$row['price'].'</td><td>'.$row['off_price'].'</td><td><a href="'.$row['weibo_url'].'" target="_blank">'.$row['weibo_url'].'</a></td></tr>';
		echo iconv('utf-8','gbk',$aline).PHP_EOL;
		$line .= $aline;
	}

$line .= "</table>";

$fp = fopen("1111.html","w");
fwrite($fp,$head.$line);
fclose($fp);

?>